import request from '@/utils/request'

// 查询企业的部门列表
export function getDepartments() {
  return request.get('/company/department')
}

// 获取员工简单列表
export function getDialogOptionList() {
  return request.get('/sys/user/simple')
}

// 新增部门
export function addDepartments(data) {
  return request.post('/company/department', data)
}

// 根据ID查询部门详情
export function getDepartmentsById(id) {
  return request.get(`/company/department/${id}`)
}

// 根据ID修改部门
export function editDepartmentsById(data) {
  return request.put(`/company/department/${data.id}`, data)
}

// 根据ID删除角色
export function delDepartmentsById(id) {
  return request.delete(`/company/department/${id}`)
}
